home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / OS / FWFiles / SLFileSp.xh < prev    next >
Encoding:
Text File  |  1996-09-16  |  12.9 KB  |  487 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: SLFileSp.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *     File:                SLFilesp.idl
  13.  * 
  14.  *     Contains:            Interfaces for FW_OFileSpecification and FW_ODirectorySpecification classes
  15.  *     Release Version:    $ ODF 2 $
  16.  * 
  17.  *     Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  18.  * 
  19.  */
  20.  
  21.  
  22. #ifndef SOM_FW_OFileSpecification_xh
  23. #define SOM_FW_OFileSpecification_xh
  24.  
  25. class FW_OFileSpecification;
  26.  
  27. #define FW_OFileSpecification_MajorVersion 1
  28. #define FW_OFileSpecification_MinorVersion 0
  29.  
  30. /*
  31.  * Passthru lines: File: "C.xh", "before"
  32.  */
  33.  
  34.  
  35. /* C++ SOM defs */
  36. #include <somcls.xh>
  37. #include <somcm.xh>
  38.  
  39. /* C++ parent defs */
  40. #ifndef SOM_SOMObject_xh
  41. #include <somobj.xh>
  42. #endif
  43.  
  44. #ifndef FW_OFileSpecification_API
  45. #define FW_OFileSpecification_API
  46. /*
  47.  * -- The Class API
  48.  */
  49.  
  50. /*
  51.  * Start of user-defined types:
  52.  */
  53. class SOMClass;
  54. class SOMObject;
  55. class FW_OFileSpecification;
  56. class FW_ODirectorySpecification;
  57.  
  58. /*
  59.  * End of user-defined types.
  60.  */
  61.  
  62. #ifdef OLDIBMSOMAPISUPPORT
  63. #define FW_OFileSpecificationCClassData FW_OFileSpecificationClassData
  64. #define FW_OFileSpecificationNewClass(major,minor) somNewVersionedClassReference(FW_OFileSpecification,major,minor)
  65. #endif
  66.  
  67. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  68. #define FW_OFileSpecificationMetaClass SOMClass
  69.  
  70. #if PRAGMA_ALIGN_SUPPORTED
  71. #  pragma options align=power
  72. #endif
  73.  
  74. /* The API to the FW_OFileSpecification class object, and the methods it introduces. */
  75. SOMEXTERN struct FW_OFileSpecificationClassDataStructure {
  76. #ifdef OLDIBMSOMAPISUPPORT
  77.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  78. #else
  79.     long zero;
  80. #endif
  81.     somStaticClassInfo *sci;
  82.     somDToken        instanceDataToken;
  83.     long reserved [3];
  84.     somMToken somInit;
  85.     somMToken somUninit;
  86.     somMToken InitFromFileName;
  87.     somMToken InitFromDirectoryAndName;
  88.     somMToken GetName;
  89.     somMToken GetParentDirectory;
  90.     somMToken GetFullPath;
  91.     somMToken IsSameAs;
  92.     somMToken AssignOFileSpecification;
  93.     somMToken AssignFileName;
  94.     somMToken AssignFileSpec;
  95.     somMToken MacGetFSSpec;
  96.     somMToken MacSetTypeAndCreator;
  97.     somMToken MacGetTypeAndCreator;
  98. } SOMDLINK FW_OFileSpecificationClassData;
  99.  
  100. #if PRAGMA_ALIGN_SUPPORTED
  101. #  pragma options align=reset
  102. #endif
  103.  
  104. #if !defined(FW_OFileSpecification_Class_Source) && !defined(SOM_Module_slfilesp_Source)
  105. #if PRAGMA_IMPORT_SUPPORTED
  106. #pragma import list FW_OFileSpecificationClassData
  107. #endif
  108. #endif
  109.  
  110.  
  111. /*
  112.  * -- Typedefs and inline method declarations for left path inherited methods
  113.  * -- are omitted because this compilation had -museinheritedmethods in effect
  114.  */
  115.  
  116.  
  117. /*
  118.  * -- Typedefs for FW_OFileSpecification Method Procedures
  119.  */
  120. SOMEXTERN {
  121. typedef void   (* SOMLINK somTD_FW_OFileSpecification_InitFromFileName)(FW_OFileSpecification *somSelf, Environment *ev,
  122.         FW_HString fileName);
  123. typedef void   (* SOMLINK somTD_FW_OFileSpecification_InitFromDirectoryAndName)(FW_OFileSpecification *somSelf, Environment *ev,
  124.         FW_ODirectorySpecification* directory,
  125.         FW_HString fileName);
  126. typedef void   (* SOMLINK somTD_FW_OFileSpecification_GetName)(FW_OFileSpecification *somSelf, Environment *ev,
  127.         FW_HString* fileName);
  128. typedef FW_ODirectorySpecification*   (* SOMLINK somTD_FW_OFileSpecification_GetParentDirectory)(FW_OFileSpecification *somSelf, Environment *ev);
  129. typedef void   (* SOMLINK somTD_FW_OFileSpecification_GetFullPath)(FW_OFileSpecification *somSelf, Environment *ev,
  130.         FW_HString* fullPathName);
  131. typedef FW_Boolean   (* SOMLINK somTD_FW_OFileSpecification_IsSameAs)(FW_OFileSpecification *somSelf, Environment *ev,
  132.         FW_OFileSpecification* theOtherFile);
  133. typedef void   (* SOMLINK somTD_FW_OFileSpecification_AssignOFileSpecification)(FW_OFileSpecification *somSelf, Environment *ev,
  134.         FW_OFileSpecification* theOtherFile);
  135. typedef void   (* SOMLINK somTD_FW_OFileSpecification_AssignFileName)(FW_OFileSpecification *somSelf, Environment *ev,
  136.         FW_HString fileName);
  137. typedef void   (* SOMLINK somTD_FW_OFileSpecification_AssignFileSpec)(FW_OFileSpecification *somSelf, Environment *ev,
  138.         FSSpec* macSpec);
  139. typedef void   (* SOMLINK somTD_FW_OFileSpecification_MacGetFSSpec)(FW_OFileSpecification *somSelf, Environment *ev,
  140.         FSSpec* macSpec);
  141. typedef void   (* SOMLINK somTD_FW_OFileSpecification_MacSetTypeAndCreator)(FW_OFileSpecification *somSelf, Environment *ev,
  142.         FW_ResourceType aFileType,
  143.         FW_ResourceType aCreatorType);
  144. typedef void   (* SOMLINK somTD_FW_OFileSpecification_MacGetTypeAndCreator)(FW_OFileSpecification *somSelf, Environment *ev,
  145.         FW_ResourceType* aFileType,
  146.         FW_ResourceType* aCreatorType);
  147. }
  148.  
  149. #endif /* FW_OFileSpecification_API */
  150.  
  151.  
  152. /*
  153.  * -- This emitter treats Method Tokens as Thunks by default.
  154.  * -- Use the sc modifier "nothunks" to change this default
  155.  */
  156. #undef somresolve_
  157. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  158.  
  159. /*
  160.  * -- The C++ Wrapper Class for FW_OFileSpecification
  161.  */
  162. class FW_OFileSpecification : public SOMObject
  163. {
  164. public:
  165.  
  166. // FW_OFileSpecification::new registers use of the class object, and then uses somNew
  167. // to allocate memory and load the object method table pointer. 
  168. void *operator new(size_t size)
  169. {
  170.     SOM_IgnoreWarning(size);
  171.     // Allocate memory using the default allocator for FW_OFileSpecification, and
  172.     // clear mem & set method table pointer, call basic initialization
  173. #ifdef SOMCHKNULL
  174.     void * __somResult = (void *)
  175.       somNewObject(FW_OFileSpecification);
  176.     SOMCHKNULL(__somResult);
  177.     return __somResult;
  178. #else
  179.     return (void*) somNewObject(FW_OFileSpecification);
  180. #endif
  181. }
  182.  
  183. // FW_OFileSpecification::delete uses the default deallocator for the object's class.
  184. void operator delete(void * obj)
  185. {
  186.     if (obj) {
  187.         SOM_Resolve(obj,SOMObject,somFree)
  188.            ( (SOMObject*) obj );
  189.     }
  190. }
  191.  
  192. /* method: InitFromFileName */
  193. void   InitFromFileName(Environment *ev,
  194.         FW_HString fileName)
  195. {
  196.    SOM_ResolveD(this,FW_OFileSpecification,FW_OFileSpecification,InitFromFileName)
  197.     (this,ev,fileName);
  198. #ifdef SOMCHKEXCEPT
  199.       SOMCHKEXCEPT;
  200. #endif
  201. }
  202.  
  203. /* method: InitFromDirectoryAndName */
  204. void   InitFromDirectoryAndName(Environment *ev,
  205.         FW_ODirectorySpecification* directory,
  206.         FW_HString fileName)
  207. {
  208.    SOM_ResolveD(this,FW_OFileSpecification,FW_OFileSpecification,InitFromDirectoryAndName)
  209.     (this,ev,directory,fileName);
  210. #ifdef SOMCHKEXCEPT
  211.       SOMCHKEXCEPT;
  212. #endif
  213. }
  214.  
  215. /* method: GetName */
  216. void   GetName(Environment *ev,
  217.         FW_HString* fileName)
  218. {
  219.    SOM_ResolveD(this,FW_OFileSpecification,FW_OFileSpecification,GetName)
  220.     (this,ev,fileName);
  221. #ifdef SOMCHKEXCEPT
  222.       SOMCHKEXCEPT;
  223. #endif
  224. }
  225.  
  226. /* method: GetParentDirectory */
  227. FW_ODirectorySpecification*   GetParentDirectory(Environment *ev)
  228. {
  229.    #ifdef SOMCHKEXCEPT
  230.    FW_ODirectorySpecification* __somResult = 
  231.       SOM_ResolveD(this,FW_OFileSpecification,FW_OFileSpecification,GetParentDirectory)
  232.     (this,ev);
  233.       SOMCHKEXCEPT;
  234.    return __somResult;
  235. #else
  236.    return SOM_ResolveD(this,FW_OFileSpecification,FW_OFileSpecification,GetParentDirectory)
  237.     (this,ev);
  238. #endif
  239. }
  240.  
  241. /* method: GetFullPath */
  242. void   GetFullPath(Environment *ev,
  243.         FW_HString* fullPathName)
  244. {
  245.    SOM_ResolveD(this,FW_OFileSpecification,FW_OFileSpecification,GetFullPath)
  246.     (this,ev,fullPathName);
  247. #ifdef SOMCHKEXCEPT
  248.       SOMCHKEXCEPT;
  249. #endif
  250. }
  251.  
  252. /* method: IsSameAs */
  253. FW_Boolean   IsSameAs(Environment *ev,
  254.         FW_OFileSpecification* theOtherFile)
  255. {
  256.    #ifdef SOMCHKEXCEPT
  257.    FW_Boolean __somResult = 
  258.       SOM_ResolveD(this,FW_OFileSpecification,FW_OFileSpecification,IsSameAs)
  259.     (this,ev,theOtherFile);
  260.       SOMCHKEXCEPT;
  261.    return __somResult;
  262. #else
  263.    return SOM_ResolveD(this,FW_OFileSpecification,FW_OFileSpecification,IsSameAs)
  264.     (this,ev,theOtherFile);
  265. #endif
  266. }
  267.  
  268. /* method: AssignOFileSpecification */
  269. void   AssignOFileSpecification(Environment *ev,
  270.         FW_OFileSpecification* theOtherFile)
  271. {
  272.    SOM_ResolveD(this,FW_OFileSpecification,FW_OFileSpecification,AssignOFileSpecification)
  273.     (this,ev,theOtherFile);
  274. #ifdef SOMCHKEXCEPT
  275.       SOMCHKEXCEPT;
  276. #endif
  277. }
  278.  
  279. /* method: AssignFileName */
  280. void   AssignFileName(Environment *ev,
  281.         FW_HString fileName)
  282. {
  283.    SOM_ResolveD(this,FW_OFileSpecification,FW_OFileSpecification,AssignFileName)
  284.     (this,ev,fileName);
  285. #ifdef SOMCHKEXCEPT
  286.       SOMCHKEXCEPT;
  287. #endif
  288. }
  289.  
  290. /* method: AssignFileSpec */
  291. void   AssignFileSpec(Environment *ev,
  292.         FSSpec* macSpec)
  293. {
  294.    SOM_ResolveD(this,FW_OFileSpecification,FW_OFileSpecification,AssignFileSpec)
  295.     (this,ev,macSpec);
  296. #ifdef SOMCHKEXCEPT
  297.       SOMCHKEXCEPT;
  298. #endif
  299. }
  300.  
  301. /* method: MacGetFSSpec */
  302. void   MacGetFSSpec(Environment *ev,
  303.         FSSpec* macSpec)
  304. {
  305.    SOM_ResolveD(this,FW_OFileSpecification,FW_OFileSpecification,MacGetFSSpec)
  306.     (this,ev,macSpec);
  307. #ifdef SOMCHKEXCEPT
  308.       SOMCHKEXCEPT;
  309. #endif
  310. }
  311.  
  312. /* method: MacSetTypeAndCreator */
  313. void   MacSetTypeAndCreator(Environment *ev,
  314.         FW_ResourceType aFileType,
  315.         FW_ResourceType aCreatorType)
  316. {
  317.    SOM_ResolveD(this,FW_OFileSpecification,FW_OFileSpecification,MacSetTypeAndCreator)
  318.     (this,ev,aFileType,aCreatorType);
  319. #ifdef SOMCHKEXCEPT
  320.       SOMCHKEXCEPT;
  321. #endif
  322. }
  323.  
  324. /* method: MacGetTypeAndCreator */
  325. void   MacGetTypeAndCreator(Environment *ev,
  326.         FW_ResourceType* aFileType,
  327.         FW_ResourceType* aCreatorType)
  328. {
  329.    SOM_ResolveD(this,FW_OFileSpecification,FW_OFileSpecification,MacGetTypeAndCreator)
  330.     (this,ev,aFileType,aCreatorType);
  331. #ifdef SOMCHKEXCEPT
  332.       SOMCHKEXCEPT;
  333. #endif
  334. }
  335.  
  336. };   /* FW_OFileSpecification */
  337.  
  338.  
  339.  
  340. #endif       /* SOM_FW_OFileSpecification_xh */
  341.  
  342. #ifndef SOM_FW_ODirectorySpecification_xh
  343. #define SOM_FW_ODirectorySpecification_xh
  344.  
  345. class FW_ODirectorySpecification;
  346.  
  347. #define FW_ODirectorySpecification_MajorVersion 1
  348. #define FW_ODirectorySpecification_MinorVersion 0
  349.  
  350. /*
  351.  * Passthru lines: File: "C.xh", "before"
  352.  */
  353.  
  354.  
  355. /* C++ SOM defs */
  356. #include <somcls.xh>
  357. #include <somcm.xh>
  358.  
  359. /* C++ parent defs */
  360. #ifndef SOM_FW_OFileSpecification_xh
  361. #include <SLFileSp.xh>
  362. #endif
  363.  
  364. #ifndef FW_ODirectorySpecification_API
  365. #define FW_ODirectorySpecification_API
  366. /*
  367.  * -- The Class API
  368.  */
  369.  
  370. /*
  371.  * Start of user-defined types:
  372.  */
  373.  
  374. /*
  375.  * End of user-defined types.
  376.  */
  377.  
  378. #ifdef OLDIBMSOMAPISUPPORT
  379. #define FW_ODirectorySpecificationCClassData FW_ODirectorySpecificationClassData
  380. #define FW_ODirectorySpecificationNewClass(major,minor) somNewVersionedClassReference(FW_ODirectorySpecification,major,minor)
  381. #endif
  382.  
  383. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  384. #define FW_ODirectorySpecificationMetaClass SOMClass
  385.  
  386. #if PRAGMA_ALIGN_SUPPORTED
  387. #  pragma options align=power
  388. #endif
  389.  
  390. /* The API to the FW_ODirectorySpecification class object, and the methods it introduces. */
  391. SOMEXTERN struct FW_ODirectorySpecificationClassDataStructure {
  392. #ifdef OLDIBMSOMAPISUPPORT
  393.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  394. #else
  395.     long zero;
  396. #endif
  397.     somStaticClassInfo *sci;
  398.     somDToken        instanceDataToken;
  399.     long reserved [3];
  400.     somMToken AppendDirectoryName;
  401. } SOMDLINK FW_ODirectorySpecificationClassData;
  402.  
  403. #if PRAGMA_ALIGN_SUPPORTED
  404. #  pragma options align=reset
  405. #endif
  406.  
  407. #if !defined(FW_ODirectorySpecification_Class_Source) && !defined(SOM_Module_slfilesp_Source)
  408. #if PRAGMA_IMPORT_SUPPORTED
  409. #pragma import list FW_ODirectorySpecificationClassData
  410. #endif
  411. #endif
  412.  
  413.  
  414. /*
  415.  * -- Typedefs and inline method declarations for left path inherited methods
  416.  * -- are omitted because this compilation had -museinheritedmethods in effect
  417.  */
  418.  
  419.  
  420. /*
  421.  * -- Typedefs for FW_ODirectorySpecification Method Procedures
  422.  */
  423. SOMEXTERN {
  424. typedef void   (* SOMLINK somTD_FW_ODirectorySpecification_AppendDirectoryName)(FW_ODirectorySpecification *somSelf, Environment *ev,
  425.         FW_HString directoryName);
  426. }
  427.  
  428. #endif /* FW_ODirectorySpecification_API */
  429.  
  430.  
  431. /*
  432.  * -- This emitter treats Method Tokens as Thunks by default.
  433.  * -- Use the sc modifier "nothunks" to change this default
  434.  */
  435. #undef somresolve_
  436. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  437.  
  438. /*
  439.  * -- The C++ Wrapper Class for FW_ODirectorySpecification
  440.  */
  441. class FW_ODirectorySpecification : public FW_OFileSpecification
  442. {
  443. public:
  444.  
  445. // FW_ODirectorySpecification::new registers use of the class object, and then uses somNew
  446. // to allocate memory and load the object method table pointer. 
  447. void *operator new(size_t size)
  448. {
  449.     SOM_IgnoreWarning(size);
  450.     // Allocate memory using the default allocator for FW_ODirectorySpecification, and
  451.     // clear mem & set method table pointer, call basic initialization
  452. #ifdef SOMCHKNULL
  453.     void * __somResult = (void *)
  454.       somNewObject(FW_ODirectorySpecification);
  455.     SOMCHKNULL(__somResult);
  456.     return __somResult;
  457. #else
  458.     return (void*) somNewObject(FW_ODirectorySpecification);
  459. #endif
  460. }
  461.  
  462. // FW_ODirectorySpecification::delete uses the default deallocator for the object's class.
  463. void operator delete(void * obj)
  464. {
  465.     if (obj) {
  466.         SOM_Resolve(obj,SOMObject,somFree)
  467.            ( (SOMObject*) obj );
  468.     }
  469. }
  470.  
  471. /* method: AppendDirectoryName */
  472. void   AppendDirectoryName(Environment *ev,
  473.         FW_HString directoryName)
  474. {
  475.    SOM_ResolveD(this,FW_ODirectorySpecification,FW_ODirectorySpecification,AppendDirectoryName)
  476.     (this,ev,directoryName);
  477. #ifdef SOMCHKEXCEPT
  478.       SOMCHKEXCEPT;
  479. #endif
  480. }
  481.  
  482. };   /* FW_ODirectorySpecification */
  483.  
  484.  
  485.  
  486. #endif       /* SOM_FW_ODirectorySpecification_xh */
  487.